@@ -1,7 +1,8 @@ |
||
| 1 | 1 |
#!/usr/bin/env ruby |
| 2 | 2 |
begin |
| 3 |
- load File.expand_path("../spring", __FILE__)
|
|
| 4 |
-rescue LoadError |
|
| 3 |
+ load File.expand_path('../spring', __FILE__)
|
|
| 4 |
+rescue LoadError => e |
|
| 5 |
+ raise unless e.message.include?('spring')
|
|
| 5 | 6 |
end |
| 6 | 7 |
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
| 7 | 8 |
require_relative '../config/boot' |
@@ -1,7 +1,8 @@ |
||
| 1 | 1 |
#!/usr/bin/env ruby |
| 2 | 2 |
begin |
| 3 |
- load File.expand_path("../spring", __FILE__)
|
|
| 4 |
-rescue LoadError |
|
| 3 |
+ load File.expand_path('../spring', __FILE__)
|
|
| 4 |
+rescue LoadError => e |
|
| 5 |
+ raise unless e.message.include?('spring')
|
|
| 5 | 6 |
end |
| 6 | 7 |
require_relative '../config/boot' |
| 7 | 8 |
require 'rake' |
@@ -1,7 +1,8 @@ |
||
| 1 | 1 |
#!/usr/bin/env ruby |
| 2 | 2 |
begin |
| 3 |
- load File.expand_path("../spring", __FILE__)
|
|
| 4 |
-rescue LoadError |
|
| 3 |
+ load File.expand_path('../spring', __FILE__)
|
|
| 4 |
+rescue LoadError => e |
|
| 5 |
+ raise unless e.message.include?('spring')
|
|
| 5 | 6 |
end |
| 6 | 7 |
require 'bundler/setup' |
| 7 | 8 |
load Gem.bin_path('rspec-core', 'rspec')
|
@@ -4,12 +4,12 @@ |
||
| 4 | 4 |
# It gets overwritten when you run the `spring binstub` command. |
| 5 | 5 |
|
| 6 | 6 |
unless defined?(Spring) |
| 7 |
- require "rubygems" |
|
| 8 |
- require "bundler" |
|
| 7 |
+ require 'rubygems' |
|
| 8 |
+ require 'bundler' |
|
| 9 | 9 |
|
| 10 |
- if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) |
|
| 11 |
- Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
|
| 12 |
- gem "spring", match[1] |
|
| 13 |
- require "spring/binstub" |
|
| 10 |
+ if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) |
|
| 11 |
+ Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
|
|
| 12 |
+ gem 'spring', match[1] |
|
| 13 |
+ require 'spring/binstub' |
|
| 14 | 14 |
end |
| 15 | 15 |
end |